package com.hxkj.client.service;

import com.hxkj.domain.po.Leaflet;
import com.platform.common.domain.result.ParameterDataStruct;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import com.platform.common.domain.result.ResultPageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;


/**
 * @author chenfangzhou
 * @create 2018-06-06 11:58
 * @desc 单页对外接口
 **/

@FeignClient(name = "cms-article")
public interface LeafletServiceClient {
    /**
     * 获取单页列表
     *
     * @param parameterDataStruct 单页对象 和 分页信息
     * @return 翻页数据
     * @throws Exception
     */
    @RequestMapping(value = "/leaflet/getlist", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultPageStruct<Leaflet> getLeafletList(@RequestBody ParameterDataStruct<Leaflet> parameterDataStruct) throws Exception;


    /**
     * 获取一条单页信息
     *
     * @param leaflet
     * @return 单页信息
     * @throws Exception
     */
    @RequestMapping(value = "/leaflet/get", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<Leaflet> getLeaflet(@RequestBody Leaflet leaflet) throws Exception;

    /**
     * 新增单页
     *
     * @param Leaflet 单页信息
     * @throws Exception
     */
    @RequestMapping(value = "/leaflet/save", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<Leaflet> saveLeaflet(@RequestBody Leaflet Leaflet) throws Exception;

    /**
     * 删除单页
     *
     * @param Leaflet 单页信息
     * @throws Exception
     */
    @RequestMapping(value = "/leaflet/remove", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct removerLeaflet(@RequestBody Leaflet Leaflet) throws Exception;


    /**
     * 修改单页
     *
     * @param Leaflet 单页信息
     * @throws Exception
     */
    @RequestMapping(value = "/leaflet/modify", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct updateLeaflet(@RequestBody Leaflet Leaflet) throws Exception;


    /**
     * 获取一条启用的单页信息
     *
     * @param leaflet
     * @return 单页信息
     * @throws Exception
     */
    @RequestMapping(value = "/leaflet/getLeaflet", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<Leaflet> getLeafletByStatus(@RequestBody Leaflet leaflet) throws Exception;


    /**
     * 获取所有启用的单页信息
     *
     * @param leaflet
     * @return 单页信息
     * @throws Exception
     */
    @RequestMapping(value = "/leaflet/getLeafletList", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<List<Leaflet>> getLeafletList(@RequestBody Leaflet leaflet) throws Exception;

    /**
     * 根据自定义标签查询 对应的单页集合
     *
     * @param leaflet
     * @return 单页信息
     * @throws Exception
     */
    @RequestMapping(value = "/leaflet/getLeafletByIds", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<List<Leaflet>> getLeafletByIds(@RequestBody Leaflet leaflet) throws Exception;


    /**
     * 通过主键获取一条单页信息  chenfangzhou
     *
     * @param
     * @return 单页信息
     * @throws Exception
     */
    @RequestMapping(value = "/leaflet/getLeafletByPrimary", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    Leaflet getLeafletByPrimary(@RequestBody Leaflet leaflet) throws Exception;

}
